import React, {Component} from 'react';
import PropTypes from 'prop-types';
import './NavHeader.scss';

export default class NavHeader extends Component {
    constructor(props) {
        super(props);
        this.state = {};
    }

    back() {
        window.history.back()
    }
    render() {
        return (
          <div className="nav-header">
              <div className="icon-back" onClick={this.back}></div>
              {this.props.title}
          </div>
        )
    }
}

NavHeader.propTypes = {
    title: PropTypes.string.isRequired
}
